

import request from '@/router/axios'


export function exportExcel(query) {
  return request({
    url: '/subwayst/swStInvalidTicket/export',
    method: 'get',
    responseType:'blob',
    params: query
  })
}

export function fetchList(query) {
  return request({
    url: '/subwayst/swStInvalidTicket/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/subwayst/swStInvalidTicket/',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/subwayst/swStInvalidTicket/' + id,
    method: 'get'
  })
}

//根据id查询要入库或出库或发送无效票到生产申请的数据
export function queryIds(ids) {
  return request({
    url: '/subwayst/swStInvalidTicket/queryIds',
    method: 'get',
    params:ids
  })
}

export function delObj(row) {
  return request({
    url: '/subwayst/swStInvalidTicket/' + row.id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/subwayst/swStInvalidTicket/',
    method: 'put',
    data: obj
  })
}

export function importExcel(body) {
  return request({
    url: '/subwayst/swStInvalidTicket/import ',
    headers: {"Content-Type": "multipart/form-data"},
    method: 'post',
    data: body
  })
}

export function delsObj(row) {
  return request({
    url: '/subwayst/swStInvalidTicket/delBatch',
    method: 'delete',
    data:row
  })
}


export function submitObj(obj) {
  return request({
    url: '/subwayst/swStInvalidTicket/submit',
    method: 'put',
    data: obj
  })
}


export function sendObj(obj) {
  return request({
    url: '/subwayst/swStInvalidTicket/send',
    method: 'put',
    data: obj
  })
}

export function completeInfo(obj) {
  return request({
    url: '/subwayst/swStInvalidTicket/completeInval',
    method: 'put',
    data: obj
  })
}


export function informObj(ids) {
  return request({
    url: '/subwayst/swStInvalidTicket/inform',
    method: 'put',
    data:ids
  })
}

export function inputDetailSubmit(ids) {
  return request({
    url: 'subwayst/swStInvalidTicket/inputDetailSubmit',
    method: 'put',
    data: ids
  })
}

export function outDetailSubmit(ids) {
  return request({
    url: 'subwayst/swStInvalidTicket/outDetailSubmit',
    method: 'put',
    data: ids
  })
}